package com.hzyl.famousreader.repository.persistence.entity;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;

import java.util.Date;

/**
 * 书籍
 */
@Entity
public class Book {

  @PrimaryKey
  public Long id;

  @ColumnInfo(name = "name")
  private String name;

  @ColumnInfo(name = "author")
  private String author;

  @ColumnInfo(name = "summary")
  private String summary;

  @ColumnInfo(name = "cover")
  private String cover;

  @ColumnInfo(name = "file")
  private String file;

  /**
   * 最后阅读时间
   */
  @ColumnInfo(name = "last_read_date")
  private Date lastReadDate;

  /**
   * 第几章
   */
  @ColumnInfo(name = "chapter")
  private Integer chapter;

  /**
   * 第几章的第几页
   */
  @ColumnInfo(name = "page")
  private Integer page;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getAuthor() {
    return author;
  }

  public void setAuthor(String author) {
    this.author = author;
  }

  public String getSummary() {
    return summary;
  }

  public void setSummary(String summary) {
    this.summary = summary;
  }

  public String getCover() {
    return cover;
  }

  public void setCover(String cover) {
    this.cover = cover;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getFile() {
    return file;
  }

  public void setFile(String file) {
    this.file = file;
  }

  public Date getLastReadDate() {
    return lastReadDate;
  }

  public void setLastReadDate(Date lastReadDate) {
    this.lastReadDate = lastReadDate;
  }

  public Integer getChapter() {
    return chapter;
  }

  public void setChapter(Integer chapter) {
    this.chapter = chapter;
  }

  public Integer getPage() {
    return page;
  }

  public void setPage(Integer page) {
    this.page = page;
  }
}
